
package lyxs_916.drawabletest;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

public class LevelDrawableActivity extends AppCompatActivity {
    ImageView iv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_level);

        iv = (ImageView) findViewById(R.id.image);
        iv.setImageLevel(4);


        findViewById(R.id.on).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                iv.setImageLevel(12);

            }
        });

        findViewById(R.id.off).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                iv.setImageLevel(8);

            }
        });
        findViewById(R.id.fw).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                iv.setImageLevel(4);

            }
        });

    }


}
